package es.nadalgoyo.frikiquest;

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import es.nadalgoyo.frikiquest.util.Constantes;
import es.nadalgoyo.frikiquest.R;
import es.sergionadal.mvc.multimedia.SoundPlayer;

public class FrikiTrivialActivity extends Activity {

	protected SoundPlayer snd;

	private int puntuacion = 0;

	private Bundle bundle;

	public Bundle getBundle() {
		return bundle;
	}

	public int getPuntuacion() {
		return puntuacion;
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.requestWindowFeature(Window.FEATURE_NO_TITLE);
		bundle = getIntent().getExtras();
		if (bundle != null)
			puntuacion = bundle.getInt(Constantes.PUNTUACION_ACUMULADA);

	}

	@Override
	protected void onPause() {
		super.onPause();
		if (snd != null)
			snd.release();
	}

	@Override
	public void onBackPressed() {
		return;
	}

	public SoundPlayer getSoundPlayerNewInstance(int idSound) {
		if (snd != null)
			snd.release();

		snd = new SoundPlayer(getBaseContext(), idSound);
		return snd;
	}

}
